<?php
/* @var $this GroupsUrlsController */
/* @var $model GroupsUrls */
/* @var $form CActiveForm */
?>


<form name="form" action="<?php echo Yii::app()->createUrl('groups/uploadUrl', array('group'=>Yii::app()->request->getParam('group')))?>" method="POST" enctype="multipart/form-data">
	<img id="loading" src="/images/loading.gif" style="display:none;">
	<div class="add_files_fld">
		<div class="c">
			<div class="cc">
				<div class="add_files_fld_txt">перетащите сюда картинку для загрузки</div>
				<a href="#" class="green_btn"><i>+</i>Добавить картинку</a>
				<label for="fileToUploadUrl"><i>+</i>Добавить аватар</label>
				<input id="fileToUploadUrl" type="file" size="45" name="image" class="fileUpload"/>
			</div>
		</div>
	</div>
</form>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'groups-urls-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data'),
	'htmlOptions'=>array('class'=>'hidden', 'rel' =>Yii::app()->createUrl('groups/settingsUrl', array('group'=>Yii::app()->request->getParam('group')))),
)); ?>

	<?php echo $form->errorSummary($model); ?>
	<?php echo $form->hiddenField($model,'id'); ?>
	<table class="flds_form">
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'name'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'name',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'name'); ?>
					</div>
				</td>
			</tr>
			
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'url'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'url',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<p><span>Пример:</span> http://google.com/</p>
						<?php echo $form->error($model,'url'); ?>
					</div>
				</td>
			</tr>
	</table>
	<?php echo CHtml::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить', array('class'=>'green_btn tac')); ?>
<?php $this->endWidget(); ?>
</div>
<div class="clear"></div>
